home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
4_8.lha
/
4_8
/
4_8m.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
752b
|
28 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <4_8A.h>
include <stream.h>
ain()
stack *s = newstack(100);
cout << "isempty? " << isempty(s) << "\n";
push(s, 3);
cout << "push(3)\n";
cout << "isempty? " << isempty(s) << "\n";
cout << "top= " << top(s) << "\n";
cout << "top= " << top(s) << "\n";
push(s, 4);
cout << "push(4)\n";
cout << "top= " << top(s) << "\n";
cout << "pop? " << pop(s) << "\n";
cout << "top= " << top(s) << "\n";
cout << "isempty? " << isempty(s) << "\n";
cout << "pop? " << pop(s) << "\n";
cout << "isempty? " << isempty(s) << "\n";
delstack(s);
return 0;